package main

import "fmt"

func main() {
	strings := []string{"one", "two", "three"}
	var index int = 1
	fmt.Printf("Original slice is: %v\n", strings)
	newStrings := remove(strings, index)
	fmt.Printf("After remove index %d, new slice is: %v\n", index, newStrings)
	fmt.Printf("After remove index %d, old slice is: %v\n", index, strings)
}

func remove(strings []string, i int) []string {
	copy(strings[i:], strings[i+1:])
	return strings[:len(strings)-1]
}
